<?php
/**
 * eBay Label Printing Program Label Profile Quick Sign Up Form Class 
 * this is a Form Class , It produce the Quick Sign Up Form ,
 * it using Dojo CSS for better looking, 
 * At quick Sign up , Not eBay seller Contact details are asked , Only Addresses 
 * @package  eBayLabelPrinter
 * @category Forms
 * @author   Norman Dong <norman.dong@hotmail.com>
 * @version  Initial
 * @copyright LeadCasket.com
 * @link     www.leadcasket.com
 * @license  Commercial
 */
class Form_Quicksignup extends Zend_Dojo_Form{
	public $_selectOptions;
	/**
	 * Init Function
	 * Produce the Form , and Nothing Need to Return 
	 */

	public function init(){
        $this->setMethod('POST');
        $this->setAttribs(array('name' => 'quicksignup'));
			
		$userNameSeller = new Zend_Dojo_Form_Element_ValidationTextBox('username_seller',array('required' => true,'invalidMessage' => 'User Name Can Not be Empty',));	
		$userNameSeller -> removeDecorator('Label')
			            -> removeDecorator('HtmlTag');
					   
		$userEmailSeller = new Zend_Dojo_Form_Element_ValidationTextBox('user_email_seller',array('required' => true,'invalidMessage' => 'User Email Can Not be Empty',));	
		$userEmailSeller -> removeDecorator('Label')
			             -> removeDecorator('HtmlTag');
						 
		$addrLine1 = new Zend_Dojo_Form_Element_ValidationTextBox('line1_seller_addr',array('required' => true,'invalidMessage' => 'First Line Can Not be Empty',));	
		$addrLine1 -> removeDecorator('Label')
			       -> removeDecorator('HtmlTag');
				   		
		$addrLine2 = new Zend_Dojo_Form_Element_TextBox('line2_seller_addr');	
		$addrLine2 -> removeDecorator('Label')
			       -> removeDecorator('HtmlTag');
		
		$addrCity = new Zend_Dojo_Form_Element_TextBox('city_seller_addr');	
		$addrCity -> removeDecorator('Label')
			       -> removeDecorator('HtmlTag');
		
		$addrState = new Zend_Dojo_Form_Element_TextBox('state_seller_addr');	
		$addrState -> removeDecorator('Label')
			       -> removeDecorator('HtmlTag');
		
		$addrPostCode = new Zend_Dojo_Form_Element_TextBox('postcode_seller_addr');	
		$addrPostCode -> removeDecorator('Label')		                        
			          -> removeDecorator('HtmlTag');
		
		/*
		$addrCountry = new Zend_Dojo_Form_Element_TextBox('country_seller_addr');	
		$addrCountry -> removeDecorator('Label')
			         -> removeDecorator('HtmlTag');
		remove for auto completation country list 
		*/
		
		$addrCountry = new Zend_Dojo_Form_Element_FilteringSelect('country_seller_addr');
        
		$addrCountry ->setAutoComplete(true)
			         ->setStoreId('nameCountry')
			         ->setStoreType('dojo.data.ItemFileReadStore')
			         ->setStoreParams(array("url"=>"/index/autocomplete"))
			         ->setAttrib('searchAttr','name_country')
			         ->setRequired(true);
		
		$addrShortLine1 = new Zend_Dojo_Form_Element_TextBox('shortform_line1_addr');	
		$addrShortLine1 -> removeDecorator('Label')
			            -> removeDecorator('HtmlTag');
		
		$addrShortLine2 = new Zend_Dojo_Form_Element_TextBox('shortform_line2_addr');	
		$addrShortLine2 -> removeDecorator('Label')
			            -> removeDecorator('HtmlTag');
		
		$submit = new Zend_Dojo_Form_Element_SubmitButton('submit_button',array('label' => 'Start Now'));	
	   		
		$this->addElements(array($userNameSeller,$userEmailSeller,$addrLine1,$addrLine2,$addrCity,$addrState,$addrPostCode,$addrCountry,$addrShortLine1,$addrShortLine2,$submit));			   

		}
	}

?>